﻿package mortal.game.view.loginNotice
{
    import com.mui.containers.globalVariable.*;
    import com.mui.controls.*;
    import com.mui.display.*;
    import extend.language.*;
    import fl.controls.*;
    import mortal.common.global.*;
    import mortal.game.view.common.*;

    public class LoginNoticePanel extends GSprite
    {
        protected var _line:ScaleBitmap;
        protected var _scrollPane:GScrollPane;
        protected var _bodySprite:LoginNoticeBody;

        public function LoginNoticePanel(param1:int, param2:int)
        {
            setSize(param1, param2);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            UIFactory.bg(0, 0, width, height, this);
            var _loc_1:* = Language.getString(11803);
            pushUIToDisposeVec(UIFactory.gTextField(Language.getString(11804), 20, 4, 100, 28, this, GlobalStyle.textFormatBai.setSize(14)));
            pushUIToDisposeVec(UIFactory.gTextField(_loc_1, 20, 28, 700, 28, this, GlobalStyle.textFormatBai.setSize(14).center()));
            this._line = UIFactory.bg(20, 55, 675, 2, this, "SplitLine6");
            this._bodySprite = UIFactory.getUICompoment(LoginNoticeBody);
            this._bodySprite.direction = GBoxDirection.VERTICAL;
            this._bodySprite.verticalGap = 2;
            this._scrollPane = UIFactory.gScrollPanel(5 + 14, this._line.y + 5, width - 23, height - 62, this);
            this._scrollPane.styleName = "chatScrollPane";
            this._scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
            this._scrollPane.verticalScrollPolicy = ScrollPolicy.AUTO;
            this._scrollPane.source = this._bodySprite;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._line.dispose();
            this._line = null;
            this._bodySprite.dispose();
            this._bodySprite = null;
            this._scrollPane.dispose();
            this._scrollPane = null;
            return;
        }// end function

        public function updateData(param1:Array, param2:Array) : void
        {
            this._bodySprite.clearVersion();
            this._bodySprite.addList(param1);
            this._bodySprite.updateList(param2);
            this._bodySprite.updatePox(20);
            this._bodySprite.invalidate();
            this._scrollPane.refreshPane();
            this._scrollPane.update();
            return;
        }// end function

    }
}
